import QtQuick 2.2
import Control.Class 1.0
import "../mainmenu"

Rectangle {
    z: 0.9
    border.color: "black";

    Component.onCompleted: {
        dbData.settitleList("select Operation from EditItems")
        for(var i=0; i< dbData.strCount(); i++)
        {
            editPanel.textnameList.push(dbData.getTitle(i));
        }
        editPanel.resetText()
    }

    ModelPanel{
        id: editPanel
        itemBorderColor: qsTr("green")
        rowspacing: 2;        columnspacing: 5
        rowCount: 6;           columnCount: 2
        /*itemWidth: (parent.width- 10)/2;*/ itemHeight: (parent.height -20)/10

        anchors.fill: parent;
        anchors.topMargin: 10; anchors.bottomMargin: 10; anchors.leftMargin: 5; anchors.rightMargin: 5

        MouseArea{
            anchors.fill: parent
            onClicked: {
                console.log("您点击了"+editPanel.getItemfromPoint(mouse.x, mouse.y))
            }
        }
    }

    InstructionPanel{
        id: dbData;
    }

//    Grid{
//        columns: 2;
//        rowSpacing: 2; columnSpacing: 5;
////        Repeater{
////            model: 16
////            InstructItem{}
////        }
//       InstructItem{textname: qsTr("剪切"); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: "gray"; bordercolor: "gray"; borderwidth: 1;}
//       InstructItem{textname: qsTr("至顶部"); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: qsTr("black"); bordercolor: qsTr("#00ACB6"); borderwidth: 1;}
//       InstructItem{textname: qsTr("复制"); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: "gray"; bordercolor: "gray"; borderwidth: 1}
//       InstructItem{textname: qsTr("至底部"); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: "black"; bordercolor: "#00ACB6"; borderwidth: 1}
//       InstructItem{textname: qsTr("粘贴"); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: "gray"; bordercolor: "gray"; borderwidth: 1}
//       InstructItem{textname: qsTr("在上面粘贴"); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: "gray"; bordercolor: "gray"; borderwidth: 1}
//       InstructItem{textname: qsTr("更改选择内容..."); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: "gray"; bordercolor: "gray"; borderwidth: 1}
//       InstructItem{textname: qsTr("删除"); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: "gray"; bordercolor: "gray"; borderwidth: 1}
//       InstructItem{textname: qsTr("ABC..."); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: "gray"; bordercolor: "gray"; borderwidth: 1}
//       InstructItem{textname: qsTr("镜像..."); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: "black"; bordercolor: "#00ACB6"; borderwidth: 1}
//       InstructItem{textname: qsTr("更改为..."); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: "gray"; bordercolor: "gray"; borderwidth: 1}
//       InstructItem{textname: qsTr("备注行"); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: "gray"; bordercolor: "gray"; borderwidth: 1}
//       InstructItem{textname: qsTr("撤销"); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: "gray"; bordercolor: "gray"; borderwidth: 1}
//       InstructItem{textname: qsTr("重做"); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: "gray"; bordercolor: "gray"; borderwidth: 1}
//       InstructItem{textname: qsTr("编辑"); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: "gray"; bordercolor: "gray"; borderwidth: 1}
//       InstructItem{textname: qsTr("选择一行"); width: (parent.width- 10)/2; height: (parent.height -20)/10; textVLocate: 1; fontsize: 18; fontcolor: "gray"; bordercolor: "gray"; borderwidth: 1}

//       anchors{
//           top: parent.top; bottom: parent.bottom; left: parent.left; right: parent.right;
//           topMargin: 10; leftMargin: 6;
//       }
//    }

}
